import 'package:flutter/material.dart';

void main() {
  runApp(const MaterialApp(
    title: 'Flutter第二天',
    home: LayoutDemo(),
  ));
}

class LayoutDemo extends StatelessWidget {
  const LayoutDemo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('水平方向布局'),
      ),
      body: Column(
        children: [
          RaisedButton(
            onPressed: () {
              print('点击了红色按钮');
            },
            child: const Text('红色按钮'),
            color: Colors.red,
          ),
          Expanded(
              child: RaisedButton(
            onPressed: () {
              print('点击了黄色按钮');
            },
            color: Colors.yellow,
            child: const Text('黄色按钮'),
          )),
          ElevatedButton(
              onPressed: () {
                print('点击了EButton');
              },
              child: const Text('E按钮'))
        ],
      ),
    );
  }
}
